let extendObservable = require("../../common/lib/mobx").extendObservable

let ble_con_store = function() {
	extendObservable(this, {
		// 显示连接对话框
		box_state: false,
		// 样式
		box_style: "no_display",
		mask_style: "no_display",
		// 设备列表
		dev_info: [],
		// 设备名称
		dev_name: "",
		// 信号强度
		signal: "",
		// 是否正在连接
		connecting: false,
		// 是否已连接
		connected: false,

		move_start: 0,
		move_end: 0,
	});
	this.show_box = function () {
		this.box_state = true
		this.mask_style = "mask_show"
		this.box_style = "box_show"
	}
	this.hide_box = function () {
		this.mask_style = "mask_hide"
		this.box_style = "box_hide"
	}
	this.update_signal = function(s) {
		this.signal = s
	}
	this.update_dev_info = function(info) {
		this.dev_info = info
	}
}

module.exports = {
	ble_con_store: new ble_con_store,
}